<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/test','ActiveController@test');
Route::any('/wechat','WechatController@serve');


Route::get('/rec','LoginController@rec'); //座位微信中专跳转地址
Route::group(['middleware' => ['web', 'aao','webAuth']], function () {
    Route::any('/getJsSdk', 'ActiveController@getJsSdk');   //获取jsSdk
    Route::any('/joinTeam', 'ActiveController@joinTeam');   //加入团队
    Route::any('/products', 'ActiveController@products');  //获取所有产品
    Route::any('/product', 'ActiveController@product'); //获取产品数据
    Route::any('/getTeam','ActiveController@getTeam'); //获取团队队员所有信息
    Route::any('/getReward','ActiveController@getReward'); //获取中奖团
    Route::get('/getTeams/{pro_id}','ActiveController@getMyTeamByProId'); //获取团队队员所有信息
    
});


Route::group(['middleware' => ['aao']], function () {
    Route::get('login', 'LoginController@login');
    Route::get('call-back/login', 'LoginController@callbackLogin');
});

Route::any('/open-platform' , 'WechatController@openPlatform');
Route::any('/wxcallback' , 'WechatController@wxcallback');
Route::any('/wxauth' , 'WechatController@auth');
